<%@ page language="java" import="java.text.*,java.util.*,com.ztesoft.core.spring.context.CustomPropertyConfigurer" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>创建计划</title> <%@ include file="/common/taglibs.jsp"%>
	<link rel="stylesheet"
		href="${ctx}/common/jslibs/fish/css/fish-desktop-compact.css" />
	<!--自定义滚动条样式-->
	<link rel="stylesheet"
		href="${ctx}/common/css/perfect-scrollbar.min.css" />
	<link rel="stylesheet"
		href="${ctx}/common/jslibs/fish/css/extra/fish-desktop-compact.css" />
	<!--[if lt IE 9]>
		<script src="${ctx}/common/jslibs/fish/js/html5shiv.js"></script>
		<script src="${ctx}/common/jslibs/fish/js/respond.js"></script>
	<![endif]-->
	<style>
body {
	border-left: 1px solid #d6d6d6;
}

.datetimepicker table {
	font-size: 12px;
}

#specialDaySelect .ui-multiselect-container .ui-multiselect-results,
	#keyColumnSelect .ui-multiselect-container .ui-multiselect-results {
	padding: 5px;
}

#specialDaySelect .ui-multiselect-container .ui-multiselect-results li {
	float: left;
	width: 26px;
	height: 26px;
	text-align: center;
}

#keyColumnSelect .ui-multiselect-container .ui-multiselect-results li {
	float: left;
	width: 50%
}

/*关联字段tabale样式重写*/
.custom-ui-jqgrid {
	border-bottom: 0;
}

.custom-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-hdiv .ui-jqgrid-htable th label
	{
	font-weight: 100
}

.custom-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-hdiv .ui-jqgrid-htable th div
	{
	height: auto
}

.custom-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-hdiv .ui-jqgrid-htable th.ui-th-column
	{
	background-color: #ededed;
	height: 36px;
	border-right: 1px solid #d7d7d7;
	font-size: 12px;
	font-weight: 100;
}

.custom-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-hdiv {
	border-color: #d7d7d7;
	border-right: 0;
	background-color: #ededed;
	color: #333;
}

.custom-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-bdiv {
	border-top: 1px solid #d7d7d7;
	border-left: 1px solid #d7d7d7;
	border-right: 0;
	overflow: visible;
}

.custom-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-bdiv .ui-jqgrid-btable tr.jqgrow td
	{
	font-size: 12px;
	font-weight: 100;
	white-space: normal;
	overflow: visible;
}

.custom-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-bdiv .ui-jqgrid-btable tr.jqgrow td label
	{
	font-weight: 100;
	white-space: nowrap;
}

.custom-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-bdiv .ui-jqgrid-btable tr.jqgrow td .form-horizontal
	{
	padding: 15px 0 7px;
}

.custom-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-bdiv .ui-jqgrid-btable tr.jqgrow td .form-horizontal .subrow
	{
	padding-bottom: 8px;
	zoom: 1;
}

.custom-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-bdiv .ui-jqgrid-btable tr.jqgrow td .form-horizontal .subrow:after
	{
	content: '\20';
	line-height: 0;
	display: block;
	clear: both;
}

.custom-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-bdiv .ui-jqgrid-btable tr.jqgrow td .form-horizontal .subrow div[class*="col-"]
	{
	padding: 0;
}

#relationFieldGrid {
	width: 95%;
}

#relationFieldGrid .subGrid {
	border: 0;
	margin: 5px 3px
}

#relationFieldGrid .subGrid .ui-jqgrid-view .ui-jqgrid-hdiv .ui-jqgrid-htable th.ui-th-column
	{
	background-color: #cadae9;
	height: 24px;
	border-right: 1px solid #b9cde0;
}

#relationFieldGrid .subGrid .ui-jqgrid-view .ui-jqgrid-hdiv {
	border-color: #b9cde0;
	border-right: 0;
	background-color: #cadae9;
}

#relationFieldGrid .subGrid .ui-jqgrid-view .ui-jqgrid-bdiv {
	border-top: 1px solid #b9cde0;
	border-left: 1px solid #b9cde0;
	border-right: 0;
}

#relationFieldGrid .subGrid .ui-jqgrid-view .ui-jqgrid-bdiv .ui-jqgrid-btable tr td
	{
	border-color: #b9cde0;
}

#relationFieldGrid .subGrid td .ui-combobox {
	margin: 2px auto;
}

#relationFieldGrid .addGridRow {
	width: 68px;
	height: 38px;
	line-height: 38px;
	position: absolute;
	margin-left: 100%;
	background-color: #cadae9;
	border-radius: 0 2px 2px 0;
	color: #1f669a;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
}

#relationFieldGrid .addGridRow:hover {
	background-color: #1f669a;
	color: #fff
}

#firstStep, #secondStep, #thirdStep, #fourthStep, #fifthStep {
	position: relative;
	margin-bottom: 13px;
	padding-bottom:50px;
}

.step-ing {
	width: 100%;
	border-bottom: 3px solid #eee;
	margin-bottom: 16px;
}

.step-ing ul {
	height: 38px;
	width: 100%;
	display: block;
	margin: 20px auto;
	list-style: none
}

.step-ing li {
	height: 38px;
	width: 20%;
	min-width: 128px;
	float: left;
	background: url('${ctx}/common/images/step-ing.png') no-repeat;
}

.step-ing li.st1 {
	background-position: 0 0;
}

.step-ing li.st2 {
	background-position: -405px -52px;
}

.step-ing li.st3 {
	background-position: -405px -104px;
}

.step-ing li.st4 {
	background-position: -405px -156px;
}

.step-ing li.st5 {
	background-position: -405px -208px;
	width: 17%;
}

.step-ing li.st2On {
	background-position: 0 -52px;
}

.step-ing li.st3On {
	background-position: 0 -104px;
}

.step-ing li.st4On {
	background-position: 0 -156px;
}

.step-ing li.st5On {
	background-position: 0 -208px
}

#tree {
	margin: 16px 0 10px 26px;
	padding-right: 26px;
	position: relative;
}

#tree li {
	padding-bottom: 10px;
}

#tree li li {
	padding-bottom: 0;
}

#tree li a {
	color: #666;
	text-decoration: none;
}

#tree li span.button.root_open, #tree li span.button.root_close, #tree li span.button.roots_open,
	#tree li span.button.roots_close, #tree li span.button.center_open,
	#tree li span.button.center_close, #tree li span.button.bottom_open,
	#tree li span.button.bottom_close, #tree li span.button.edit, #tree li span.button.remove
	{
	background: url('${ctx}/common/images/step-ing.png') no-repeat
}

#tree li ul.line {
	background: none
}

#tree li span.button.root_open, #tree li span.button.roots_open, #tree li span.button.center_open,
	#tree li span.button.bottom_open {
	background-position: -621px 2px;
}

#tree li span.button.root_close, #tree li span.button.roots_close, #tree li span.button.center_close,
	#tree li span.button.bottom_close {
	background-position: -654px 2px;
}

#tree li span.button.edit {
	background-position: -718px 1px;
	margin: 0 6px 0 20px;
}

#tree li span.button.remove {
	background-position: -685px 2px
}

#tree li span.button.switch {
	height: 24px;
}

.strategy-tree-box {
	border: 1px dashed #4d92c9;
	border-radius: 4px;
	margin: 0 16px
}

.strategy-tree-box .strategy-tree-act {
	height: 38px;
	line-height: 38px;
	background-color: #f5f5f5;
	text-align: center;
	border: 1px solid #fff;
	border-radius: 4px;
}

.text-sucess {
	color: #090
}

.text-danger {
	color: #f33
}

.strategy-tree-info {
	margin: 6px 18px 0;
	height: 36px;
	line-height: 18px;
	color: #090;
	overflow: hidden;
}

.addLeafNode {
	height: 22px;
	line-height: 22px;
	padding: 0 8px;
	color: #fff;
	background-color: #049eff;
	border: 0;
	border-radius: 2px;
	margin-top: -2px
}

.addLeafNode:hover {
	background-color: #f90
}

.addLeafNode:active {
	background-color: #ffc600
}
.ui-alert-affix{width:30%;margin-left:-15%;}
#dbLinkId[readonly]{background-color:#fff}
#nodeId[readonly]{background-color:#fff}
#startTimeBox thead,#startTimeBox .disabled,#startTimeBox .datetimepicker-now{display:none;}
</style>
<style>
	body{border-left:1px solid #d6d6d6;}
	label{white-space:nowrap;}
	.btn{border-radius:2px;}
	.custom2-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-hdiv .ui-jqgrid-htable th label{font-weight:100}
	.custom2-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-hdiv .ui-jqgrid-htable th.ui-th-column{background-color:#cbdbe9;height:30px;border-right:1px solid #b9cee1;font-size:12px;font-weight:100;color:#2c5072;font-size:12px;}
	.custom2-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-hdiv{border-color:#b9cee1;background-color:#cbdbe9;}
	.custom2-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-bdiv{border-top:1px solid #b9cee1;border-left:1px solid #b9cee1;overflow-x:hidden}
	.custom2-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-bdiv .ui-jqgrid-btable tr.jqgrow td{height:30px;border-color:#d9e3ed;font-size:12px;font-weight:100;padding:0 6px;}
	.custom2-ui-jqgrid .ui-jqgrid-view .ui-jqgrid-bdiv .ui-jqgrid-btable tr.jqgrow td label{font-weight:100;text-overflow:ellipsis;overflow:hidden;}
	#monitor_jqGrid #monitor_jqGrid_pager{padding:8px 0;height:auto;}
	#monitor_jqGrid .ui-jqgrid-view .ui-jqgrid-bdiv{overflow-x:hidden;}
	.custom_a_btn{margin-right:3px;display:inline-block;padding:4px 8px;text-decoration:none;border-radius:2px;}
	#monitor_jqGrid .ui-jqgrid-view .ui-jqgrid-bdiv .ui-jqgrid-btable tr.jqgrow td .custom_a_btn:last-child{margin-right:0;}
	.custom_a_btn span{color:#777;}a.custom_a_btn:hover,a.custom_a_btn.active{color:#fff;}
	.a_primary,.a_primary:focus,.text-a_primary{color:#337ab7;}.a_primary:hover,.a_primary.active{background-color:#337ab7;}.a_primary:hover span,.a_primary.active span{color:#bfd0e4;}
	.a_sucess,.a_sucess:focus,.text-a_sucess{color:#090}.a_sucess:hover,.a_sucess.active{background-color:#090}.a_sucess:hover span,.a_sucess.active span{color:#b8dab8;}
	.a_warning,.a_warning:focus,.text-a_warning{color:#f90}.a_warning:hover,.a_warning.active{background-color:#f90}.a_warning:hover span,.a_warning.active span{color:#ffdab8;}
	.a_hold,.a_hold:focus,.text-a_hold{color:#c6f}.a_hold:hover,.a_hold.active{background-color:#c6f}.a_hold:hover span,.a_hold.active span{color:#eccbff;}
	.a_danger,.a_danger:focus,.text-a_danger{color:#f33}.a_danger:hover,.a_danger.active{background-color:#f33}.a_danger:hover span,.a_danger.active span{color:#ffbfbf;}
	.a_progress{width:100%;margin:5px auto 0;background-color:#d6d6d6;height:4px;}
	.a_progress .progress-bar{background-color:#090;height:4px;}
	.ui-dialog.panel{border-color:#999;border-radius:6px;padding:10px;box-shadow:0 0 0 6px rgba(0,0,0,.3) ;}
	.ui-widget-overlay{opacity: 0}
	.btn-a-warning{background-color:#f90;color:#fff;border-color:#f80;}
	.btn-a-warning:hover,.btn-a-warning:focus{background-color:#f80;color:#fff;border-color:#f90;}
	.btn-a-warning:active{background-color:#f60;color:#fff;border-color:#f50;}
	#dialog-grid{margin-top:6px;}
	#dialog-grid td.text-muted{padding:5px 0;}
	#nodeId[readonly]{background-color:#fff}
	.ui-dialog{font-size:12px;}
	.ui-dialog .modal-header{margin:-10px -10px 0;background-color:#fff;border-radius:4px;border:0;text-align: center;color:#999;font-family:'宋体'}
	.ui-dialog .close{margin-top:-28px;}
	.ui-jqgrid .ui-jqgrid-view .ui-jqgrid-bdiv .ui-jqgrid-btable tr.jqgrow td{white-space: normal;}
	a:hover,a:focus{text-decoration: none;}
	.ui-multiselect-container .ui-multiselect-choices li.search-choice > span{max-width:100%  !important;}
 	.datetimepicker.datetimepicker-dropdown.dropdown-menu.datetimepicker-orient-right.datetimepicker-orient-bottom {left: 0px !important;}
 </style>
	<body>
		<!-- <input type="text" id='test' /> <button id='testbtn'>sdf</button> -->
		<div class="container-fluid">
			<div class="step-ing">
				<ul>
					<li class="st1"></li>
					<li class="st2"></li>
					<li class="st3"></li>
					<li class="st4"></li>
					<li class="st5"></li>
				</ul>
			</div>
		</div>
		<!-- 第一步，新建计划界面 -->
		<div class="container-fluid" id="firstStep">
			<div class="row">
				<form id="planForm" action="#" method="post" autocomplete="off"
					style="margin-bottom: 0">
					<div class="col-xs-8">
						<div class="row form-horizontal">
							<div class="col-xs-6">
								<div class="form-group">
									<label class="col-xs-4 control-label">计划名称</label>
									<div class="input-group col-xs-8">
										<input type="text" class="form-control" name="planName"
											data-rule="required; length[~50]" data-msg-required="计划名称不能为空"
											data-msg-length="计划名称不能大于50个字符"/>
									</div>
								</div>
								<div class="form-group">
									<label class="col-xs-4 control-label">源数据类型</label>
									<div class="input-group col-xs-8">
										<label class="radio-inline"><input type="radio"
											name="sourceType" value="1" checked="checked" />表</label> <label
											class="radio-inline"><input type="radio"
											name="sourceType" value="2" disabled=true/>文件</label>
									</div>
								</div>
								<div class="form-group" id="targetType">
									<label class="col-xs-4 control-label">目标数据类型</label>
									<div class="input-group col-xs-8">
										<label class="radio-inline"><input type="radio"
											name="targetType" value="0" checked="checked" />历史表</label> <label
											class="radio-inline"><input type="radio"
											name="targetType" value="1" disabled=true/>文件</label> <label class="radio-inline"><input
											type="radio" name="targetType" value="2" disabled=true/>大数据平台</label>
									</div>
								</div>
								<div class="form-group">
									<label class="col-xs-4 control-label">操作类型</label>
									<div class="input-group col-xs-8">
										<input type="text" name="operType" data-rule="required" 
										data-msg-required="操作类型不能为空" readOnly="true"/>
									</div>
								</div>
								<div class="form-group" id="analyseFlag">
									<label class="col-xs-4 control-label">清理后执行</label>
									<div class="input-group col-xs-8">
										<label class="checkbox-inline"><input type="checkbox"
											checked="checked" name="tableAnalyseFlag" value="1" />表分析</label> <label
											class="checkbox-inline"><input type="checkbox"
											checked="checked" name="indexAnalyseFlag" value="1" />索引分析</label>
									</div>
								</div>
								<div class="form-group" id="needCheck">
									<label class="col-xs-4 control-label">清理方式</label>
									<div class="input-group col-xs-8">
										<label class="radio-inline"><input type="radio"
											checked="checked" name="needCheck" value="T" />人工审核后清理</label> <label
											class="radio-inline"><input type="radio"
											name="needCheck" value="F" />系统自动清理</label>
									</div>
								</div>
							</div>
							<div class="col-xs-6">
								<div class="form-group">
									<label class="col-xs-4 control-label">所属系统</label>
									<div class="input-group col-xs-8">
										<input type="text" class="form-control" name="nodeId"
											data-rule="required;" data-msg-required="所属系统不能为空" readOnly="true"/>
									</div>
								</div>
								<div class="form-group">
									<label class="col-xs-4 control-label">执行方式</label>
									<div class="input-group col-xs-8">
										<label class="radio-inline"><input type="radio"
											checked="checked" name="execType" value="1" />自动执行</label> <label
											class="radio-inline"><input type="radio"
											name="execType" value="2" />手工执行</label>
									</div>
								</div>
								<div class="form-group" id="execFrequency">
									<label class="col-xs-4 control-label">执行频率</label>
									<div class="input-group col-xs-8">
										<label class="radio-inline"><input type="radio"
											checked="checked" name="execFrequency" value="0" />循环执行</label> <label
											class="radio-inline"><input type="radio"
											name="execFrequency" value="1" />单次执行</label>
									</div>
								</div>
								<div class="form-group" id="cycleType">
									<label class="col-xs-4 control-label">循环方式</label>
									<div class="input-group col-xs-8">
										<label class="radio-inline"><input type="radio"
											checked="checked" name="cycleType" value="0" />按月</label> <label
											class="radio-inline"><input type="radio"
											name="cycleType" value="1" />按天</label>&nbsp;&nbsp; <span
											class="form-inline"> 循环周期：<input type="text" value="1"
											class="form-control" name="cycleDay" style="width: 30px"
											onkeyup='this.value=this.value.replace(/[^1-9]\D*$/,"")'
											data-rule="required; integer; range[1~1000]" data-msg-required="循环周期不能为空"
											data-msg-integer="循环周期为大于1的正数" data-msg-range="循环周期为大于1的正数" />
										</span>
									</div>
								</div>
								<div class="form-group" id="startTime">
									<label class="col-xs-4 control-label">执行时间</label>
									<div class="input-group col-xs-8" id="startTimeBox">
										<input type="text" readonly class="form-control"
											name="startTime" data-rule="required;"
											data-msg-required="执行时间不能为空" />
									</div>
								</div>
								<div class="form-group" id="specialDay">
									<label class="col-xs-4 control-label">排除日期</label>
									<div class="input-group col-xs-8" id="specialDaySelect">
										<select name="specialDay" class="form-control" multiple
											data-placeholder="1~31可多选">
											<option value="1">1</option>
											<option value="2">2</option>
											<option value="3">3</option>
											<option value="4">4</option>
											<option value="5">5</option>
											<option value="6">6</option>
											<option value="7">7</option>
											<option value="8">8</option>
											<option value="9">9</option>
											<option value="10">10</option>
											<option value="11">11</option>
											<option value="12">12</option>
											<option value="13">13</option>
											<option value="14">14</option>
											<option value="15">15</option>
											<option value="16">16</option>
											<option value="17">17</option>
											<option value="18">18</option>
											<option value="19">19</option>
											<option value="20">20</option>
											<option value="21">21</option>
											<option value="22">22</option>
											<option value="23">23</option>
											<option value="24">24</option>
											<option value="25">25</option>
											<option value="26">26</option>
											<option value="27">27</option>
											<option value="28">28</option>
											<option value="29">29</option>
											<option value="30">30</option>
											<option value="31">31</option>
										</select>
									</div>
								</div>
							</div>
							<div class="col-xs-12">
								<div class="form-group">
									<label class="col-xs-2 control-label">生失效时间</label>
									<div class="form-inline">
										<div class="input-group">
											<input type="text" name="effDate" class="form-control"
												data-rule="required;" data-msg-required="生效时间不能为空" readOnly="true"/>
										</div>
										<label>&nbsp;至&nbsp;</label>
										<div class="input-group">
											<input type="text" name="expDate" class="form-control"
												data-rule="required;" data-msg-required="失效时间不能为空" readOnly="true"/>
										</div>
									</div>
								</div>
								<div class="form-group">
									<label class="col-xs-2 control-label">描述</label>
									<div class="col-xs-10 input-group">
										<textarea class="form-control" rows="3" name="planDesc" maxlength="250"
											data-rule="length[~250]" data-msg-length="描述不能大于250个字符"></textarea>
									</div>
								</div>
							</div>
							<div class="col-xs-12 hidden">
								<span class="text-success">当前资源：cpu-50%，内存-50，表空间-50%</span>
								<div class="text-danger">当系统资源达到或者超过(cpu-70%，内存-80%，表空间-80%)，任务不启动！</div>
							</div>
						</div>
					</div>
				</form>
				<div class="col-xs-4">
					<div style="padding-right: 10px; position: fixed">
						<div class="strategy-tree-box">
							<div id="tree" class="ztree"></div>
							<div class="strategy-tree-act">
								<a href="javascript:void(0)" id="addParentNode">[ 添加策略组 ]</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<a href="javascript:void(0)" id="expandAllNode">[ 收起全部 ]</a>
							</div>
						</div>
						<div class="strategy-tree-info">
							一个分组生成出一个任务实例。多个分组之间采取并发运行的方式。组内策略<span class="text-danger">按顺序</span>串行执行。
						</div>
					</div>
				</div>
			</div>
		</div>
		<!-- 第二步，源数据配置 -->
		<div class="container-fluid hidden" id="secondStep">
			<div class="col-xs-12 form-horizontal form-group"
				style="padding: 10px; border-bottom: 1px solid #e3e3e3; background-color: #f9f9f9">
				<label class="control-label pull-left">查询表名</label>
				<div class="col-xs-3">
					<input type="text" class="form-control" name="searchTableName" />
					<input type="text" class="form-control hidden" name="searchDbLinkId" />
				</div>
				<button type="button" id="button-src-table-search"
					class="btn btn-primary">
					&nbsp;<span class="glyphicon glyphicon-search"></span>&nbsp;&nbsp;&nbsp;查询&nbsp;&nbsp;&nbsp;
				</button>
				<button type="button" id="button-src-table-add"
					class="btn btn-primary pull-right">
					&nbsp;<span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;&nbsp;重置&nbsp;&nbsp;&nbsp;
				</button>
			</div>
			<form id="srcTableForm" action="#" method="post" autocomplete="off">
				<!-- <div class="form-horizontal col-xs-12"> -->
				<div class="col-xs-12" style="padding-top: 16px">
					<div class="row form-horizontal">
						<div class="form-group">
							<label class="control-label col-xs-1">数据库</label>
							<div class="input-group col-xs-3">
								<input type="text" class="form-control" name="dbLinkId"
									data-rule="required" data-msg-required="数据库不能为空" readOnly="true"/>
							</div>
						</div>
						<div class="form-group hidden">
							<label class="control-label col-xs-1">源表标识</label>
							<div class="row col-xs-5">
								<input type="text" name="sourceDataId" />
							</div>
						</div>
						<!-- <div class="form-group hidden">
							<label class="control-label col-xs-1">源表索引</label>
							<div class="row col-xs-5">
								<input type="text" name="diiPOList" />
							</div>
						</div> -->
						<div class="form-group hidden">
							<label class="control-label col-xs-1">源表锁模式</label>
							<div class="row col-xs-5">
								<input type="text" name="lockMode" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-xs-1">表名</label>
							<div class="row col-xs-5">
								<input type="text" name="tableName" />
							</div>
							<!-- <div class="row col-xs-5"><input type="text" class="form-control" name="tableName" data-rule="required" data-msg-required="源数据表名不能为空"/></div> -->
							<button type="button" id="button-src-table-verify"
								class="btn btn-primary">&nbsp;&nbsp;验证&nbsp;&nbsp;</button>
						</div>
						<div class="form-group">
							<label class="control-label col-xs-1">关键字段</label>
							<div class="row col-xs-5" id="keyColumnSelect">
								<select name="keyColumn" class="form-select" multiple=""
									data-rule="required" data-msg-required="关键字段不能为空"></select>
							</div>
						</div>
						<div class="form-group hidden" id="concurrentNumber">
							<label class="control-label col-xs-1">并发数</label>
							<div class="col-xs-3 form-inline">
								<div class="row">
									<input type="text" name="concurrentNumber" class="form-control"
										size='3' value='1' data-rule="required; integer; range[1~10]" data-msg-integer="请填写不超过10的正整数"
										data-msg-required="并发数不能为空" data-msg-range="请填写不超过10的正整数"/>&nbsp;&nbsp;条
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-xs-1">热点数据</label>
							<div class="col-xs-3">
								<div class="row">
									<label class="radio-inline"><input name="hotDataFlag"
										checked="checked" type="radio" value="1" />是</label> <label
										class="radio-inline"><input name="hotDataFlag"
										type="radio" value="0" />否</label>
								</div>
							</div>
							<label class="control-label col-xs-2">每批次提交记录数</label>
							<div class="col-xs-4 form-inline">
								<div class="row">
									<input type="text" name="batchCommitCount" class="form-control" maxlength="4"
										size='3' value='1000' data-rule="required; integer; range[1~1000]" data-msg-integer="请填写不超过1000的正整数"
										data-msg-required="每批次提交记录数不能为空" data-msg-range="请填写不超过1000的正整数"/>&nbsp;&nbsp;条
								</div>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-xs-1">归档类型</label>
							<div class="col-xs-3">
								<div class="row">
									<label class="radio-inline"><input name="archiveType"
										checked="checked" type="radio" value="0" />单表归档</label> <label
										class="radio-inline"><input name="archiveType"
										type="radio" value="1" />关联归档</label>
								</div>
							</div>
							<div id='upperCnt'>
								<label class="control-label col-xs-2">允许归档记录上限</label>
								<div class="col-xs-4 form-inline">
									<div class="row">
										<input type="text" name="upperCnt" class="form-control" maxlength="5"
											size='3' value='10' data-rule="required; integer; range[1~10000]" data-msg-integer="请填写不超过10000的正整数"
											data-msg-required="允许归档记录上限不能为空" data-msg-range="请填写不超过10000的正整数"/>&nbsp;&nbsp;万
									</div>
								</div>
							</div>
						</div>
						<div class="ui-jqgrid custom-ui-jqgrid hidden"
							id="relationFieldGrid">
							<div id="src_add_sub_table" class="addGridRow text-center">
								<span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;添加
							</div>
							<div class="ui-jqgrid-view">
								<div class="ui-jqgrid-hdiv">
									<table class="ui-jqgrid-htable" cellspacing="0" cellpadding="0"
										border="0" style="width: 100%">
										<tr>
											<th style="width: 46%" class="ui-th-column">从表</th>
											<th style="width: 46%" class="ui-th-column">关联字段</th>
											<th style="width: 8%" class="ui-th-column">操作</th>
										</tr>
									</table>
								</div>
								<div class="ui-jqgrid-bdiv">
									<table id="sub_table" class="ui-jqgrid-btable" cellspacing="0"
										cellpadding="0" border="0" style="width: 100%">
										<tr id="sub_table_1" class="jqgrow">
											<td style="width: 46%">
												<div class="form-horizontal">
													<div class="subrow">
														<label class="control-label col-xs-2">数据库</label>
														<div class="col-xs-7">
															<input type="text" data-rule='required;'
																data-msg-required='数据库不能为空' name="subTableDbLinkId_1"
																class="form-control database-treecombo" readOnly="true"/>
														</div>
													</div>
													<div class="subrow hidden">
														<label class="control-label col-xs-2">源表分表标识</label>
														<div class="col-xs-8">
															<input type="text" class="form-control"
																name="sub_table_Id_1" />
														</div>
													</div>
													<div class="subrow">
														<label class="control-label col-xs-2">表名</label>
														<div class="col-xs-8">
															<input type="text" class="form-control table-plancombo"
																name="sub_table_name_1" />
														</div>
														<button type="button" class="btn btn-primary"
															name="button_sub_table_verify_1">验证</button>
													</div>
												</div>
											</td>
											<td style="width: 46%">
												<div class="ui-jqgrid subGrid">
													<div class="ui-jqgrid-view">
														<div class="ui-jqgrid-hdiv">
															<table class="ui-jqgrid-htable" cellspacing="0"
																cellpadding="0" border="0" style="width: 100%">
																<tr>
																	<th style="width: 46%" class="ui-th-column">主表字段</th>
																	<th style="width: 46%" class="ui-th-column">从表字段</th>
																	<th style="width: 8%" class="ui-th-column">操作</th>
																</tr>
															</table>
														</div>
														<div class="ui-jqgrid-bdiv">
															<table class="ui-jqgrid-btable" id="columns_relation_1" cellspacing="0" cellpadding="0" border="0" style="width: 100%">
																<tr>
																	<td style='background:#f0f0f0;color:#bbb;text-shadow:1px 1px 0px #fff;text-align: center'>暂无关联字段</td>
																</tr>
															</table>
														</div>
													</div>
												</div>
											</td>
											<td style="width: 8%; text-align: center"
												onClick="getDel(this)"><a href="#"
												class="glyphicon glyphicon-trash"></a></td>
										</tr>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
			</form>
		</div>
		<!-- 第三步，选择目标数据 -->
		<div class="container-fluid hidden" id="thirdStep">
			<form id="targetTableForm" action="#" method="post"
				autocomplete="off">
				<div class="ui-jqgrid custom-ui-jqgrid" id="TargetDataGrid">
					<div class="ui-jqgrid-view">
						<div class="ui-jqgrid-hdiv">
							<table class="ui-jqgrid-htable" cellspacing="0" cellpadding="0"
								border="0" style="width: 100%">
								<tr>
									<th style="width: 18%" class="ui-th-column">源表</th>
									<th style="width: 72%" class="ui-th-column">目标表</th>
									<!-- <th style="width: 72%; text-align: left" class="ui-th-column">
										<div class="form-horizontal">
											<label class="control-label col-xs-1">目标表：</label> <label
												class="control-label col-xs-1">数据库</label>
											<div class="input-group col-xs-3">
												<input type="text" class="form-control"
													name="targetTableDbLinkId" />
											</div>
										</div>
									</th> -->
									<th style="width: 10%" class="ui-th-column">字段映射</th>
								</tr>
							</table>
						</div>
						<div class="ui-jqgrid-bdiv">
							<table class="ui-jqgrid-btable" id="targetTable" cellspacing="0"
								cellpadding="0" border="0" style="width: 100%">
							</table>
						</div>
					</div>
				</div>
			</form>
		</div>
		<!-- 第四步，配置条件 -->
		<div class="container-fluid hidden" id="fourthStep">
			<form id="conditionForm" action="#" method="post" autocomplete="off">
				
					
		
				<div class="form-horizontal col-xs-12">
					<div class="form-group">
						<label class="col-xs-1 control-label">归档方式</label>
						<div class="input-group col-xs-3">
							<label class="radio-inline"><input type="radio"
								name="archiveMode" value="1" checked="checked" />条件归档</label> <label
								class="radio-inline"><input type="radio"
								name="archiveMode" value="2"/>分区归档</label> <label
								class="radio-inline"><input type="radio"
								name="archiveMode" value="3"/>全表归档</label>
							<input type="text" class="form-control hidden" name="dbDataFlag" />
						</div>

					</div>
				</div>
				
				<div class="form-horizontal col-xs-12" >
					<div class="form-group" id="textArea">
						<label class="col-xs-1 control-label">置换分区</label>	
						<div class="col-xs-11 form-inline">
							<div class="row">
								alter table $source_table_name exchange partition $partition_name with table $dest_table_name
							</div>
						</div> 
					</div>
				</div>
				

				<!-- <div class="form-horizontal col-xs-6" id="secondBondLeft">
					<div class="form-group">
						<label class="col-xs-2 control-label">取值逻辑</label>
						<div class="input-group col-xs-6">
							<input type="text" name="getValueLogi" readOnly="true"/>
						</div>
					</div>
				</div>
				<div class="form-horizontal col-xs-6" id="secondBondRigth">
					
					<div class="form-group" id="enumVauleText">
						<label class="col-xs-1 control-label">枚举值</label>
						<div class="input-group col-xs-8">
							<textarea class="form-control" rows="3" name="enumVaule"></textarea>
						</div>
					</div>
					<div class="form-group" id="monthCombox">
						<label class="col-xs-2 control-label">时间格式</label>
						 <div class="input-group col-xs-5">
				            <select name="comboboxDate" id="comboboxDate" class="form-control">
				                <option value="0">年月</option>
				                <option value="1">年月日</option>
				            </select>
				        </div>					       
					</div>
				</div> -->
				

				<div class="form-horizontal col-xs-12" >
					<div class="form-group" id="importCommandArea">
						<label class="col-xs-1 control-label">导入命令</label>	
						<div class="col-xs-11 form-inline">
							<div class="row">
								imp $username/$password@&nbsp;<input type="text" class="form-control" name="importTableArea" />
								file=<input type="text" class="form-control" name="importCommandArea"/>&nbsp;full=y ignore=y
							</div>
						</div> 
					</div>
				</div>
				<div class="form-horizontal col-xs-12" >
					<div class="form-group" id="exportCommandArea">
						<label class="col-xs-1 control-label">导出命令</label>
						<div class="col-xs-11 form-inline"> 
							<div class="row">
								exp $username/$password@&nbsp;<input type="text" class="form-control" name="exportTableArea" />
								file=<input type="text" class="form-control" name="exportCommandArea" /> &nbsp;tables=($tablename:$partition_name)
							</div>
						</div>
					</div>
				</div>

				<div class="form-horizontal col-xs-12" >
					<div class="form-group" id="importCommand">
						<label class="col-xs-1 control-label">导入命令</label>	
						<div class="col-xs-11 form-inline">
							<div class="row">
								imp $1/$2@$3&nbsp;<input type="text" class="form-control" name="importTable" />
								full=y file=<input type="text" class="form-control" name="importCommand" />&nbsp;ignore=y
							</div>
						</div> 
					</div>
				</div>
				<div class="form-horizontal col-xs-12" >
					<div class="form-group" id="exportCommand">
						<label class="col-xs-1 control-label">导出命令</label>
						<div class="col-xs-11 form-inline"> 
							<div class="row">
								exp $1/$2@$3&nbsp;<input type="text" class="form-control" name="exportTable" />
								&nbsp;file=<input type="text" class="form-control" name="exportCommand" /> &nbsp;tables=($4)
							</div>
						</div>
					</div>
				</div>

				<div class="form-horizontal col-xs-12" >
					<div class="form-group" id="thirdBondRigth">
						<label class="col-xs-1 control-label">存储过程</label>
						 <div class="input-group col-xs-4">
				            <input type="text" name="procedureName" id="procedureName" class="form-control">
				        </div>					       
					</div>
				</div> 
				<div class="form-horizontal col-xs-12">
					<div class="form-group" id="sectCondition">
						<label class="col-xs-1 control-label">归档条件</label>
						<div class="input-group col-xs-10">
							<textarea class="form-control" rows="9" name="selectCondition" data-rule="required;" data-msg-required="归档条件不能为空"></textarea>
						</div>
					</div>
					<div class="form-group" id="jscriptCheck">
						<label class="col-xs-1 control-label"></label>
						<button type="button" id="button-script-verify"
							class="col-xs-1 btn btn-xs btn-primary">
							脚本验证&nbsp;&nbsp;&nbsp;<span
								class="glyphicon glyphicon-menu-right"></span>
						</button>
					</div>
					<div class="form-group" id="scriptVerify">
						<label class="col-xs-1 control-label"></label>
						<div class="input-group col-xs-10">
							<textarea class="form-control" rows="9" name="scriptVerify"></textarea>
						</div>
					</div>
				</div>
			</form>
		</div>
		<!-- 第五步，配置完成 -->
		<div class="container-fluid hidden text-center" id="fifthStep">
			<div style="padding:60px 0 36px"><img id="add_success_img" src="${ctx}/common/images/step5success.png" width="497" height="76" border="0"/><img class="hidden" id="draft_success_img" src="${ctx}/common/images/step5success_draft.png" width="497" height="76" border="0"/></div>
			您还可以：&nbsp;&nbsp;&nbsp;
			<button type="button" id="button-add-plan" class="btn btn-sm btn-primary addLeafNode" style="line-hight:38px;height:38px;margin-right:10px">
				<span class="glyphicon glyphicon-menu-left"></span>
				&nbsp;&nbsp;&nbsp;&nbsp;继续添加计划&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			</button>
			<button type="button" id="button-plan-grid" class="btn btn-sm btn-primary addLeafNode" style="line-hight:38px;height:38px;margin-right:70px">
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;查看计划列表&nbsp;&nbsp;&nbsp;&nbsp; <span class="glyphicon glyphicon-menu-right"></span>
			</button>
			<button type="button" id="button-plan-grid-draft" class="btn btn-sm btn-primary addLeafNode hidden" style="line-hight:38px;height:38px;margin-right:70px">
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;查看草稿箱&nbsp;&nbsp;&nbsp;&nbsp; <span class="glyphicon glyphicon-menu-right"></span>
			</button>
		</div>
		<!-- 底部按钮，上一步，下一步，保存草稿 -->
		<div id="btm-actBtnGroup" class="col-xs-12 text-right" style="height:40px; padding: 2px; background: #e2e2e2;position:fixed;bottom:0;z-index:2">
			<button type="button" id="button-prov"
				class="btn btn-sm btn-primary pull-left" style="margin: 3px 0 0 2px">
				<span class="glyphicon glyphicon-menu-left"></span>
				&nbsp;&nbsp;&nbsp;&nbsp;上一步&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			</button>
			<button type="button" id="button-save-draft"
				class="btn btn-xs btn-primary hidden" style="margin: 5px 6px 0 0">
				<span class="glyphicon glyphicon-floppy-open"></span> &nbsp;保存草稿
			</button>
			<button type="button" id="button-add-strategy"
				class="btn btn-xs btn-primary" style="margin: 5px 6px 0 0">
				<span class="glyphicon glyphicon-floppy-open"></span> &nbsp;继续添加策略
			</button>
			<button type="button" id="button-next" class="btn btn-sm btn-primary"
				style="margin: 3px 3px 0 0">
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;下一步&nbsp;&nbsp;&nbsp;&nbsp; <span
					class="glyphicon glyphicon-menu-right"></span>
			</button>
			<button type="button" id="button-submit"
				class="btn btn-sm btn-primary" style="margin: 3px 3px 0 0">
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;完成提交&nbsp;&nbsp;&nbsp;&nbsp; <span
					class="glyphicon glyphicon-menu-right"></span>
			</button>

		</div>
		<!--==============所属系统下拉树================-->
		<div id="nodeId_commbox_tree" class="dropdown-list"
			style="position: absolute; display: none">
			<div id="nodeId_tree" class="ztree"></div>
		</div>
		<!--=============主表数据库下拉树================-->
		<div id="dbLinkId_commbox_tree" class="dropdown-menu"
			style="position: absolute; display: none">
			<div id="dbLinkId_tree" class="ztree"></div>
		</div>
		<!--=============从表数据库下拉树================-->
		<div id="subTableDbLinkId_commbox_tree_1" class="dropdown-menu"
			style="position: absolute; display: none">
			<div id="subTableDbLinkId_tree_1" class="ztree"></div>
		</div>
		<!--=============目标表（总）数据库下拉树================-->
		<!-- <div id="targetTotalTableDbLinkId_commbox_tree" class="dropdown-menu"
			style="position: absolute; display: none">
			<div id="targetTotalTableDbLinkId_tree" class="ztree"></div>
		</div> -->
		<script src="${ctx}/common/jslibs/fish/js/fish-desktop-all.js"></script>
		<script src="${ctx}/common/jslibs/fish/js/jquery.ztree.all-3.5.js"></script>
		<script
			src="${ctx}/common/jslibs/jquery/perfect-scrollbar.jquery.min.js"></script>
		<script src="${ctx}/common/jslibs/fish/js/extra/fish.plancombobox.js"></script>
		<script>
		var plan = <%=request.getParameter("dmPlanId")%>||0;
		var act =   '<%=request.getParameter("act")%>';
		// 创建计划跳转URL，菜单名称，菜单Id
		var addplanURL = '<%=CustomPropertyConfigurer.getContextProperty("addplanURL")%>';
		var addplanName = '<%=CustomPropertyConfigurer.getContextProperty("addplanName")%>';
		var addplanId = '<%=CustomPropertyConfigurer.getContextProperty("addplanId")%>';
		//计划维护跳转URL，菜单名称，菜单Id
		var editplanURL = '<%=CustomPropertyConfigurer.getContextProperty("editplanURL")%>';
		var editplanName = '<%=CustomPropertyConfigurer.getContextProperty("editplanName")%>';
		var editplanId = '<%=CustomPropertyConfigurer.getContextProperty("editplanId")%>';
		//草稿箱跳转URL，菜单名称，菜单Id
		var draftURL = '<%=CustomPropertyConfigurer.getContextProperty("draftURL")%>';
		var draftName = '<%=CustomPropertyConfigurer.getContextProperty("draftName")%>';
		var draftId = '<%=CustomPropertyConfigurer.getContextProperty("draftId")%>';
		var setting;
		function customResize() {
			winHeight = $(window).height();
			//$('#firstStep,#secondStep,#thirdStep,#fourthStep,#fifthStep').height(winHeight-150).perfectScrollbar();
			$('#tree').height(winHeight-270).perfectScrollbar();
		}
		$(window).bind('load resize',customResize);
		$('#button-prov,#button-next,#button-submit').bind('click',customResize);
	</script>
	<script src="${ctx}/planmanage/addplan/js/addPlan.js"></script>
	<script src="${ctx}/planmanage/addplan/js/editPlan.js"></script>
	<script src="${ctx}/planmanage/addplan/js/addPlan_first.js"></script>
	<script src="${ctx}/planmanage/addplan/js/addPlan_second.js"></script>
	<script src="${ctx}/planmanage/addplan/js/addPlan_third.js"></script>
	<script src="${ctx}/planmanage/addplan/js/addPlan_fourth.js"></script>
	<div id="startTimeBox"></div>
	</body>
</html>
